USE [pbvs]
GO

/****** Object:  Table [dbo].[ValuationRequests]    Script Date: 02/20/2013 20:52:11 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[ValuationRequests](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[CreatedDt] [date] NOT NULL,
	[ClientId] [int] NOT NULL,
	[CaseId] [varchar](50) NOT NULL,
	[Name] [nvarchar](255) NOT NULL,
	[Email] [nvarchar](255) NOT NULL,
	[PlanName] [nvarchar](255) NOT NULL,
	[ParticipantFirstName] [nvarchar](255) NOT NULL,
	[ParticipantLastName] [nvarchar](255) NOT NULL,
	[Gender] [nvarchar](50) NOT NULL,
	[Dob] [date] NOT NULL,
	[Doh] [date] NOT NULL,
	[Dot] [date] NOT NULL,
	[RetirementDate] [date] NOT NULL,
	[BenefitAtRetirement] [decimal](18, 2) NOT NULL,
	[EarnedDate] [date] NOT NULL,
	[AnnuityType] [nvarchar](100) NOT NULL,
	[ValuationDate] [date] NOT NULL,
	[OverrideInterest] [bit] NOT NULL,
	[InterestRate] [decimal](18, 2) NOT NULL,
	[SubjectToCola] [bit] NOT NULL,
	[Cola] [decimal](18, 2) NOT NULL,
	[UseFractional] [bit] NOT NULL,
	[MaritalPortion] [decimal](18, 2) NOT NULL,
	[MarriageDate] [date] NOT NULL,
	[EarningStartDate] [date] NOT NULL,
	[MarriageEarningEndDate] [date] NOT NULL,
	[Survivorship] [bit] NOT NULL,
	[SurvivorFirstName] [nvarchar](255) NOT NULL,
	[SurvivorLastName] [nvarchar](255) NOT NULL,
	[SurvivorDob] [date] NOT NULL,
	[SurvivorMonthlyBenefit] [decimal](18, 2) NOT NULL,
	[PreDecease] [decimal](18, 2) NOT NULL,
 CONSTRAINT [PK_ValuationRequest] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[ValuationRequests]  WITH CHECK ADD  CONSTRAINT [FK_ValuationRequests_Client] FOREIGN KEY([ClientId])
REFERENCES [dbo].[Clients] ([ClientId])
ON UPDATE CASCADE
ON DELETE CASCADE
GO

ALTER TABLE [dbo].[ValuationRequests] CHECK CONSTRAINT [FK_ValuationRequests_Client]
GO

